/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_offer_prod_rela.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_OFFER_PROD_RELA
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_offer_prod_rela.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_OFFER_PROD_RELA::CTable_PPM_OFFER_PROD_RELA( )
 :NPCRecordSet( )
{
  setTableName( "PPM_OFFER_PROD_RELA" );
  prepareTable();
  prepareQuery();
 
  OFFER_PROD_RELA_ID.setField( "OFFER_PROD_RELA_ID", DATA_DOUBLE, 9, 1 );
  makeTableItem( OFFER_PROD_RELA_ID );
  makeKeyItem( OFFER_PROD_RELA_ID ); 
  PRODUCT_ID.setField( "PRODUCT_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRODUCT_ID );
  PROD_OFFER_ID.setField( "PROD_OFFER_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PROD_OFFER_ID );
  ROLE_CD.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( ROLE_CD );
  MAX_COUNT.setField( "MAX_COUNT", DATA_DOUBLE, 10, 0 );
  makeTableItem( MAX_COUNT );
  MIN_COUNT.setField( "MIN_COUNT", DATA_DOUBLE, 10, 0 );
  makeTableItem( MIN_COUNT );
  RULE_TYPE.setField( "RULE_TYPE", DATA_CHAR, 2, 0 );
  makeTableItem( RULE_TYPE );
  RELA_TYPE.setField( "RELA_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( RELA_TYPE );
  STATE_CD.setField( "STATE_CD", DATA_CHAR, 20, 0 );
  makeTableItem( STATE_CD );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 14, 0 );
  makeTableItem( STATE_DATE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 14, 0 );
  makeTableItem( CREATE_DATE );

  PARENT_ROLE_CD.setField( "PARENT_ROLE_CD", DATA_CHAR, 9, 0 );
  makeTableItem( PARENT_ROLE_CD );
  ROLE_NAME.setField( "ROLE_NAME", DATA_CHAR, 500, 0 );
  makeTableItem( ROLE_NAME );
}


CTable_PPM_OFFER_PROD_RELA::CTable_PPM_OFFER_PROD_RELA( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_OFFER_PROD_RELA" );
  prepareTable();
  prepareQuery();
 
  OFFER_PROD_RELA_ID.setField( "OFFER_PROD_RELA_ID", DATA_DOUBLE, 9, 1 );
  makeTableItem( OFFER_PROD_RELA_ID );
  makeKeyItem( OFFER_PROD_RELA_ID ); 
  PRODUCT_ID.setField( "PRODUCT_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PRODUCT_ID );
  PROD_OFFER_ID.setField( "PROD_OFFER_ID", DATA_DOUBLE, 9, 0 );
  makeTableItem( PROD_OFFER_ID );
  ROLE_CD.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( ROLE_CD );
  MAX_COUNT.setField( "MAX_COUNT", DATA_DOUBLE, 10, 0 );
  makeTableItem( MAX_COUNT );
  MIN_COUNT.setField( "MIN_COUNT", DATA_DOUBLE, 10, 0 );
  makeTableItem( MIN_COUNT );
  RULE_TYPE.setField( "RULE_TYPE", DATA_CHAR, 2, 0 );
  makeTableItem( RULE_TYPE );
  RELA_TYPE.setField( "RELA_TYPE", DATA_CHAR, 6, 0 );
  makeTableItem( RELA_TYPE );
  STATE_CD.setField( "STATE_CD", DATA_CHAR, 20, 0 );
  makeTableItem( STATE_CD );
  STATE_DATE.setField( "STATE_DATE", DATA_DATETIME, 14, 0 );
  makeTableItem( STATE_DATE );
  CREATE_DATE.setField( "CREATE_DATE", DATA_DATETIME, 14, 0 );
  makeTableItem( CREATE_DATE );

  PARENT_ROLE_CD.setField( "PARENT_ROLE_CD", DATA_CHAR, 9, 0 );
  makeTableItem( PARENT_ROLE_CD );
  ROLE_NAME.setField( "ROLE_NAME", DATA_CHAR, 500, 0 );
  makeTableItem( ROLE_NAME );
}

CTable_PPM_OFFER_PROD_RELA::~CTable_PPM_OFFER_PROD_RELA( )
{
    close();
}

